<template>
  <div class="home">
    歌单列表
    <div v-for="item in list" :key="item.id" @click="getdetail(item.id)">
      <!-- <img :src="item.mp3Url" alt="" /> -->
      <span>{{ item.name }}</span>
    </div>
  </div>
</template>

<script>
//import {loadMusicAPI,} from "../../api/home"
//import {getmusicAPI} from "../../api/home"
//import {getlistApi} from "../../api/home"
import { newlistenAPI } from "../../api/home";
export default {
  data() {
    return {
      list: [],
    };
  },
  computed: {},
  watch: {},

  methods: {
    async getgedan() {
      // const result = await  loadMusicAPI(id);
      // console.log(result);
      //const result = await getmusicAPI ();
      //const result = await getlistApi (id);
      const result = await newlistenAPI();
      console.log(result);
      this.list = result.data.data;
      console.log(this.list);
      console.log(this.list.mvid);
    },
    getdetail(id) {
      this.$router.push(`/gosonglistDetail/${id}`);
    },
  },
  created() {
    this.getgedan();
  },
  mounted() {},
  components: {},
};
</script>
<style scoped>
</style>